Various embodiments of the present invention relate to databases, and more specifically, to a method and apparatus for partitioning a database.
With the development of database technology, databases are widely applied in various respects of people's work and life. Further, with the complication of business processes associated with databases, a database might include dozens of and even more tables. If all these tables are stored in the same data node, then phenomena such as lengthy response time and even outages because of excess accesses and so on, might occur to this data node.
To solve the problem of too large of a data amount in a single data node, there have been proposed technical solutions for vertically partitioning and horizontally partitioning multiple tables in a database. However, existing partition solutions are not adapted to various types of databases. For example, current technical solutions can only vertically partition databases that meet a specific relation (e.g., constrained tree schema CTS). Such additional constraint conditions greatly limit vertical partition.
However, as people's requirements on data management become constantly complicated, the database design also tends to get increasingly complicated. As a result, most of current databases do not conform to the requirement of CTS. Therefore, it is a focus of attention regarding how to get rid of these additional constraint conditions and enable partitioning of various types of databases.